/*
 * Vehicle.cpp
 *
 *  Created on: Aug 25, 2009
 *      Author: Thada Pipatcharoenkij 49270325
 */


#include "Vehicle.h"

using namespace std;

/**
 * Default constructor
 */
Vehicle::Vehicle() {

}

/**
 * Default destructor
 */
Vehicle::~Vehicle() {

}

/**
 * Copy constructor to copy the object to the new one
 * @param vehicle The Vehicle object
 */
Vehicle::Vehicle(const Vehicle& vehicle){
	this->manufacturer = vehicle.manufacturer;
	this->cylinders = vehicle.cylinders;
	this->owner = Person(owner);
}

/**
 * Initialize constructor
 * @param manufacturer the string of manufacturer name
 * @param cylinders the number of cylinders
 * @param owner the Person object
 */
Vehicle::Vehicle(string manufacturer, int cylinders, const Person &owner){
	this->manufacturer = manufacturer;
	this->cylinders = cylinders;
	this->owner = Person(owner);
}

/**
 * Accessor method for cylinders
 * @return number of cylinders
 */
int Vehicle::getCylinders() const
{
	return cylinders;
}

/**
 * Accessor method for manufacturer name
 * @return manufacturer name
 */
string Vehicle::getManufacturer() const
{
	return manufacturer;
}

/**
 * Accessor method for owner
 * @return owner (Person object)
 */
Person Vehicle::getOwner() const
{
	return owner;
}

/**
 * Mutator method for number of cyloinders
 * @param cylinders new number of cylinders
 */
void Vehicle::setCylinders(int cylinders)
{
	this->cylinders = cylinders;
}

/**
 * Mutator method for manufacturer name
 * @param manufacturer the new string of the name
 */
void Vehicle::setManufacturer(string manufacturer)
{
	this->manufacturer = manufacturer;
}

/**
 * Mutator method for owner
 * @param owner new Person object
 */
void Vehicle::setOwner(const Person & owner)
{
	this->owner = owner;
}
